*/
const AS_IMAGE_REDIRECT_LOGGED = 234;
+ /**
+ * HTML id and name for the beginning of the edit form.
+ */
+ const EDITFORM_ID = 'editform';
+
/**
* @var Article
*/
} elseif ( $contextTitle->exists() && $this->section != '' ) {
$msg = $this->section == 'new' ? 'editingcomment' : 'editingsection';
} else {
- $msg = $contextTitle->exists() || ( $contextTitle->getNamespace() == NS_MEDIAWIKI && $contextTitle->getDefaultMessageText() !== false ) ?\r
- 'editing' : 'creating';\r
+ $msg = $contextTitle->exists() || ( $contextTitle->getNamespace() == NS_MEDIAWIKI && $contextTitle->getDefaultMessageText() !== false ) ?
+ 'editing' : 'creating';
}
# Use the title defined by DISPLAYTITLE magic word when present
- $displayTitle = isset( $this->mParserOutput ) ? $this->mParserOutput->getDisplayTitle() : false;\r
- if ( $displayTitle === false ) {\r
- $displayTitle = $contextTitle->getPrefixedText();\r
+ $displayTitle = isset( $this->mParserOutput ) ? $this->mParserOutput->getDisplayTitle() : false;
+ if ( $displayTitle === false ) {
+ $displayTitle = $contextTitle->getPrefixedText();
}
$wgOut->setPageTitle( wfMessage( $msg, $displayTitle ) );
}
}
}
- $wgOut->addHTML( Html::openElement( 'form', array( 'id' => 'editform', 'name' => 'editform',
+ $wgOut->addHTML( Html::openElement( 'form', array( 'id' => EDITFORM_ID, 'name' => EDITFORM_ID,
'method' => 'post', 'action' => $this->getActionURL( $this->getContextTitle() ),
'enctype' => 'multipart/form-data' ) ) );
* @return string
*/
function getPreviewText() {
- global $wgOut, $wgUser, $wgParser, $wgRawHtml;
+ global $wgOut, $wgUser, $wgParser, $wgRawHtml, $wgLang;
wfProfileIn( __METHOD__ );
} elseif ( $this->incompleteForm ) {
$note = wfMsg( 'edit_form_incomplete' );
} else {
- $note = wfMsg( 'previewnote' );
+ $note = wfMsg( 'previewnote' ) .
+ ' [[#' . EDITFORM_ID . '|' . $wgLang->getArrow() . ' ' . wfMsg( 'continue-editing' ) . ']]';
}
$parserOptions = ParserOptions::newFromUser( $wgUser );
'updated' => '(Updated)',
'note' => "'''Note:'''",
'previewnote' => "'''Remember that this is only a preview.'''
-Your changes have not yet been saved! [[#editform|→ Continue editing]]",
+Your changes have not yet been saved!",
+'continue-editing' => "Continue editing",
'previewconflict' => 'This preview reflects the text in the upper text editing area as it will appear if you choose to save.',
'session_fail_preview' => "'''Sorry! We could not process your edit due to a loss of session data.'''
Please try again.
'sitejspreview' => 'Text displayed on preview of .js pages in MediaWiki namespace',
'updated' => '{{Identical|Updated}}',
'previewnote' => 'Note displayed when clicking on Show preview',
+'continue-editing' => 'A link to the beginning of the editing textarea on the same page. Displayed after {{msg-mw|previewnote}}.',
'editing' => "Shown as page title when editing a page. \$1 is the name of the page that is being edited. Example: \"''Editing Main Page''\".",
'creating' => "Shown as page title when creating a page. Parameters:
* \$1 is the name of the page that is being created. Example: \"''Creating Main Page''\".",